package br.com.gaacorp.sai.webapp.action;

import java.io.Serializable;
import java.util.List;

import br.com.gaacorp.sai.webapp.action.BasePage;
import br.com.gaacorp.sai.model.Questionnaire;
import br.com.gaacorp.sai.service.GenericManager;

public class QuestionnaireList extends BasePage implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -459875718071142199L;
	private GenericManager<Questionnaire, Long> questionnaireManager;

    public void setQuestionnaireManager(GenericManager<Questionnaire, Long> questionnaireManager) {
        this.questionnaireManager = questionnaireManager;
    }

    public QuestionnaireList() {
        setSortColumn("questionnaireId"); // sets the default sort column
    }

    public List getQuestionnaires() {
        return sort(questionnaireManager.getAll());
    }
}

